package com.gr.service.impl;

import com.gr.entity.Book;
import com.gr.mapper.BookMapper;
import com.gr.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class BookServiceImpl implements BookService {
    @Autowired
    private BookMapper bookMapper;

    @Override
    public List<Book> selectByRecommend() {
        return bookMapper.selectByRecommend();
    }

    @Override
    public List<Book> selectBySaleNum() {
        return bookMapper.selectBySaleNum();
    }

    @Override
    public List<Book> selectByGroDate() {
        return bookMapper.selectByGroDate();
    }

    @Override
    public List<Book> selectByGroDateAndSaleNum() {
        return bookMapper.selectByGroDateAndSaleNum();
    }

    @Override
    public Book selectOne(Integer id) {
        return bookMapper.selectOne(id);
    }
}
